rabbittyfandomcom-20200213-history
The Rabbittian Library of Code
Text gimmicks Superscript Subscript Small Big Small caps Formatting gimmicks Block quote Poem Headings There are two types of each heading: One with the edit button after it, and one without Table of contents (TOC) If a page has at least 4 headings, a table of contents is generated by default, right before the first heading. If you want it to be otherwise, there are a few ways to do that. Text Font Size Color Stuff inside |Example = A 5px Ridge Purple border, with a border-radius of 2ex. }} Padding Margin Mix and match Different Side Stuff Different Corners Solid Background Gradients Background You can have as many colors as you want as long as you have at least two. Linear Sideways Catty-Corner Radial Percentages For any of the gradient types, you can also put in percentages before the commas, like this, to control how fast it blurs: (Purple 25%, BlueViolet 75%) Text Color Size Letter Spacing Shadow Box glow Text shadow Box Size Width Alignment Browser-Specific Code :-webkit- Google Chrone and Safari :-moz- Mozilla Firefox These are browser-specific prefixes. If you label an element with one, like -webkit-linear-gradient or -moz-border-radius then that element will only show if you're on that browser. Images Image Mapping }| }| }| } } } } } } } default } |Example = Image:Chocolate.png|300px poly 72 512 290 933.0000152587891 1223 341.00001525878906 1225 304.00001525878906 953 52 https://en.wikipedia.org/wiki/Chocolate }} Templates noinclude Any text in the noinclude tags will be applied to the template page, but not to pages the template is used on. Whatever It's particularly useful for categories. includeonly Any text in the includeonly tags will be applied to pages the template is used on, but not to the template page. Whatever It's particularly useful for categories. If statements If statements are used only in templates. They're for when you want the code to have a different outcome depending on what's put into it. If statements may be stacked and used inside each each other. #if This one has two outcomes: One if a certain variable has a value, and one if not. Either of the two outcomes spots may be left blank so that outcome is nothing. } |response if variable ISN'T empty |response if variable IS empty }} When the template is used, if it says |Variable = Anything at all, then the first field will be shown. If not, the second field will be shown. #ifeq This one has two outcomes: One if a certain variable has a specific value, and one if not. Either of the two outcomes spots may be left blank so that outcome is nothing. } |potential value |response if variable is the potential value |response if variable is something else }} When the template is used, if it says |Variable = potential value, then the first field will be shown. If not, the second field will be shown. #switch If you have more than one specific response for more than one specific value, use this one. As always, any of the responses can be left blank so the outcome is nothing. } |Value1 = Response for Value1 |Value2 = Response for Value2 |#default = Response if variable doesn't equal any of them }} When the template is used, the response for whatever value is given to the variable will be shown, and the default one if it doesn't fill any of the others. The default field is optional, and if there isn't one, then the default response is blank. #ifexpr } > or < a number or something }} |response if variable fits expression |response if doesn't fit expression }}